package com.zhongxi.guoyuan.utils;

import android.content.Context;
import android.widget.Toast;

import com.zhongxi.guoyuan.application.MyApplication;

/**
 * Created by Administrator on 2018/1/5.
 * 静态吐司
 */

public class ToastUtil {

    private static Toast toast;

    private static void getShow(Context context, String text) {
        if (toast == null) {
            toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
        }
        toast.setText(text);
        toast.show();
    }

    public static void show(String str) {
        getShow(UiUtils.getContext(), str);
    }
}
